﻿using MonsterLove.StateMachine;
using QFramework;
using UnityEngine;
namespace Test
{
    public enum States
    {
        Init, 
        Play, 
        Win, 
        Lose
    }

    class SetStates
    {
        public States states { get; set; }
        public SetStates(States states)
        {
            this.states = states;
        }
    }
    public interface FSMStatesModel : IModel
    {

    }

    
    
    public interface FSMSystem:IFsmSystem<States>
    {
       
    }

    public class FSMExample : AbstractFsmSystem<States>,FSMSystem
    {
        protected override void OnInit()
        {
            RegisterEvent();
        }

        private void RegisterEvent()
        {
            this.RegisterEvent<SetStates>((states =>
            {
                SetState(states.states);
            }));
        }
    }
    
}